home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Where is "graph.h" in UNIX???
- Date: 12 Mar 1996 13:36:03 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4i4qo3INNb6r@keats.ugrad.cs.ubc.ca>
- References: <KENNYC.96Mar12121852@happy.s3.com>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <KENNYC.96Mar12121852@happy.s3.com>,
- Kenny Chen S3 Inc (408)980-5401 x3425 <kennyc@happy.s3.com> wrote:
- >I am trying to draw some simple curves using C program. Is it possible
- >that I can do it in the UNIX system?
-
- You can do it, but you have to use special libraries. There are many graphics
- libraries in the UNIX world, some of which are standardized and portable, more
- less. Others are specific to a particular workstation, just like Turbo C's
- methods are particular to, well, Turbo C.
-
- One popular graphics system is the client/server XWindow system, which is
- driven by a portable client C library called Xlib. It, along with its
- associated tools like Xt (the X toolkit) is found just about everywhere there
- is UNIX with a graphical display. Other libraries such as OpenGL are not as
- universal.
-
- Get some Xlib programming manuals, and come back in six months when your simple
- curves program functions! :) Or find some freeware, easy-to-use graphics
- library which can be used over X. One such library is VOGL---which supports a
- small subset of GL.
-
- There is an X newsgroup, by the way, where X questions are appropriate.
-
- Another possibility is to generate PostScript output via printf() and friends.
- This is the closest method that is even remotely on-topic for this newsgroup,
- barring a discussion of the actual PostScript itself.
-
- You can view a generated PostScript file via a viewer such as GhostView which
- uses the GhostScript back end.
-
- This is probably your best best. Why? Because PostScript has a rich drawing
- model, is easy to work with (basically you just print out a text file
- PostScript program), and many high-quality printers will accept your program
- directly. The output is also compact, resolution independent and easy to
- encapsulate as EPSF and incorporate into existing documents (LaTeX, Framemaker,
- etc). Furthermore, you can draw text in PostScript in all kinds of fonts, at
- any rotation or scale, and even embed bitmapped images.
-
- Or I have to use the Turbo C in
- >PC?
- >And where can I find the "conio.h" and "graph.h" ?
-
- Nowhere. These are particular to the PC/MSDOS C environments.
- --
-
-